package com.mooc.yohoshop.ui.seckill;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.mooc.yohoshop.R;
import com.mooc.yohoshop.entity.SecKillGoodsEntity;
import com.mooc.yohoshop.imgload.ImageLoad;

import org.jetbrains.annotations.NotNull;

public class SecKillAdapter extends BaseQuickAdapter<SecKillGoodsEntity.Values, BaseViewHolder> {

    public SecKillAdapter() {
        super(R.layout.item_seckill);
        addChildClickViewIds(R.id.seckill_add_tv);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, SecKillGoodsEntity.Values values) {
        ImageLoad.loadMatchUrlRound(values.goods_default_icon,baseViewHolder.getView(R.id.seckill_item_img));
        baseViewHolder.setText(R.id.seckill_item_title,values.goods_default_sku);
        baseViewHolder.setText(R.id.seckill_item_dec,values.goods_desc);
        baseViewHolder.setText(R.id.seckill_item_price,values.goods_default_price);
    }

}
